import request from '@/utils/request'

// 查询销毁任务列表
export function listArchiveDesTask(query) {
  return request({
    url: '/archive/ArchiveDesTask/list',
    method: 'get',
    params: query
  })
}

// 查询销毁任务详细
export function getArchiveDesTask(taskId) {
  return request({
    url: '/archive/ArchiveDesTask/' + taskId,
    method: 'get'
  })
}

// 新增销毁任务
export function addArchiveDesTask(data) {
  return request({
    url: '/archive/ArchiveDesTask',
    method: 'post',
    data: data
  })
}

// 修改销毁任务
export function updateArchiveDesTask(data) {
  return request({
    url: '/archive/ArchiveDesTask',
    method: 'put',
    data: data
  })
}

// 删除销毁任务
export function delArchiveDesTask(taskId) {
  return request({
    url: '/archive/ArchiveDesTask/' + taskId,
    method: 'delete'
  })
}
//根据taskid获取销毁用户
export function selectDesUserByTaskId(taskId) {
  return request({
    url: '/archive/ArchiveDesUser/selectDesUserByTaskId/' + taskId,
    method: 'get'
  })
}
//根据taskid获取销毁档案
export function selectArchiveDesByTaskId(taskId) {
  return request({
    url: '/archive/ArchiveDes/selectArchiveDesByTaskId/' + taskId,
    method: 'get'
  })
}

/**
 * 销毁档案
 * @param data
 */
export function destructionFiles(data) {
  return request({
    url: '/archive/ArchiveDes/updateArchiveDesTaskStatus',
    method: 'post',
    data: data
  })
}

/**
 * 销毁用户
 * @param data
 */
export function destructionUsers(data) {
  return request({
    url: '/archive/ArchiveDesUser/updateArchiveDesUserTaskStatus',
    method: 'post',
    data: data
  })
}

/**
 * 上报
 * @param data
 * @returns {*}
 */
export function report(data){
  return request({
    url: '/archive/ArchiveDesTask/archiveDesTaskResultReport',
    method: 'post',
    data: data
  })
}
